using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Resources;
using System.Windows.Forms;
using Infragistics.Win;
using Infragistics.Win.UltraWinDataSource;
using Infragistics.Win.UltraWinEditors;
using Infragistics.Win.UltraWinGrid;
using PluginFrame;

namespace ExperimentRuleEditor
{
	public class Condition_Editor : Form
	{
		protected ResourceManager mResourceManager;

		private string m_LExpression;

		private int m_LExpressionIndex;

		private string m_LProjectName;

		private readonly IPcrLogService mPcrLogService;

		private IApplication mApplication;

		private int m_LPattern;

		private int m_LTarget;

		private int m_LOperator;

		private string m_LValue;

		private IRuleItem m_LRuleItem;

		private int m_LExpressionCheck;

		private IContainer components;

		private UltraGrid ultraGridCondition;

		private UltraOptionSet ultraOptionSet;

		private Button btOk;

		private Button btCancel;

		public string GetSelectConditionText
		{
			get
			{
				return m_LExpression;
			}
		}

		public int GetSelectExpressionIndex
		{
			get
			{
				return m_LExpressionIndex;
			}
		}

		public int GetCheckIndex
		{
			get
			{
				return ultraOptionSet.CheckedIndex;
			}
		}

		public int GetPatternIndex
		{
			get
			{
				return m_LPattern;
			}
		}

		public int GetTargetIndex
		{
			get
			{
				return m_LTarget;
			}
		}

		public int GetExpressionCheck
		{
			get
			{
				return m_LExpressionCheck;
			}
		}

		public int GetOperatorIndex
		{
			get
			{
				return m_LOperator;
			}
		}

		public string GetValueIndex
		{
			get
			{
				return m_LValue;
			}
		}

		public Condition_Editor(IApplication app, string mExpression, int mExpressionIndex, IRuleItem mRuleItem, string mProjectName, int m_Check, int m_Pattern, int m_Target, int m_ExpressionCheck, int m_Operator, string m_Value)
		{
			InitializeComponent();
			mApplication = app;
			m_LPattern = m_Pattern;
			m_LTarget = m_Target;
			m_LOperator = m_Operator;
			m_LValue = m_Value;
			mResourceManager = ResourceManager.CreateFileBasedResourceManager("ExperimentRuleEditor", mApplication.GetResourceFolder() + GetType().Namespace + "\\", null);
			m_LRuleItem = mRuleItem;
			m_LExpression = mExpression;
			m_LExpressionIndex = mExpressionIndex;
			m_LExpressionCheck = m_ExpressionCheck;
			if (m_LExpressionIndex > 8)
			{
				ultraOptionSet.CheckedIndex = 1;
			}
			else
			{
				ultraOptionSet.CheckedIndex = m_Check;
			}
			m_LProjectName = mProjectName;
			InitializeForm();
			mPcrLogService = (IPcrLogService)app.GetService("PcrLogService");
		}

		private void InitializeForm()
		{
			UltraDataSource ultraDataSource = new UltraDataSource();
			int num = 0;
			ultraDataSource.Band.Columns.Add("Minimum");
			ultraDataSource.Band.Columns["Minimum"].DataType = typeof(double);
			ultraDataSource.Band.Columns.Add("Comparision");
			ultraDataSource.Band.Columns.Add("Expression");
			ultraDataSource.Band.Columns.Add("Comparision ");
			ultraDataSource.Band.Columns.Add("Maximum");
			ultraDataSource.Band.Columns["Maximum"].DataType = typeof(double);
			string[] array = null;
			if (m_LExpressionIndex > 8)
			{
				string[] separator = new string[4] { "<", "<=", "=", "<>" };
				string[] array2 = m_LExpression.Split(separator, StringSplitOptions.RemoveEmptyEntries);
				string[] array3 = m_LExpression.Split(' ');
				array = ((m_LExpressionIndex - 10 == 0) ? new string[3]
				{
					array2[0].Trim(),
					array3[array3.Length - 2],
					array3[array3.Length - 1]
				} : ((array2[array2.Length - 1].Contains(array3[array3.Length - 1]) && array2.Length > 2) ? new string[5]
				{
					array2[0].Trim(),
					array3[1],
					array2[1].Trim(),
					array3[array3.Length - 2],
					array3[array3.Length - 1]
				} : new string[3]
				{
					array2[0].Trim(),
					array3[1],
					array2[1].Trim()
				}));
			}
			else if (m_LExpression != "")
			{
				string[] separator2 = new string[4] { "<", "<=", "=", "<>" };
				string[] array4 = m_LExpression.Split(separator2, StringSplitOptions.RemoveEmptyEntries);
				string[] array5 = m_LExpression.Split(' ');
				array = ((m_LExpressionIndex == 0) ? new string[3]
				{
					array4[0].Trim(),
					array5[array5.Length - 2],
					array5[array5.Length - 1]
				} : ((array4[array4.Length - 1].Contains(array5[array5.Length - 1]) && array4.Length > 2) ? new string[5]
				{
					array4[0].Trim(),
					array5[1],
					array4[1].Trim(),
					array5[array5.Length - 2],
					array5[array5.Length - 1]
				} : new string[3]
				{
					array4[0].Trim(),
					array5[1],
					array4[1].Trim()
				}));
			}
			else
			{
				array = m_LExpression.Split(' ');
			}
			object[] array6 = new object[ultraDataSource.Band.Columns.Count];
			if (array.Length == 1)
			{
				array6[1] = " ";
				array6[2] = array[0];
				array6[3] = " ";
			}
			else if (((m_LExpressionIndex <= 8) ? m_LExpressionIndex : (m_LExpressionIndex - 10)) == 0)
			{
				array6[1] = " ";
				array6[2] = array[array.Length - 3];
				array6[3] = array[array.Length - 2];
				array6[4] = array[array.Length - 1];
			}
			else if (array.Length == 5)
			{
				array6[0] = array[0];
				array6[1] = array[1];
				array6[2] = array[2];
				array6[3] = array[3];
				array6[4] = array[4];
			}
			else
			{
				array6[0] = array[0];
				array6[1] = array[1];
				array6[2] = array[2];
				array6[3] = " ";
			}
			ultraDataSource.Rows.Add(array6);
			((ISupportInitialize)ultraGridCondition).BeginInit();
			UltraGridBand ultraGridBand = new UltraGridBand("Band 0", -1);
			foreach (UltraDataColumn item in (IEnumerable)ultraDataSource.Band.Columns)
			{
				UltraGridColumn ultraGridColumn = new UltraGridColumn(item.Key);
				ultraGridColumn.AutoSizeMode = ColumnAutoSizeMode.AllRowsInBand;
				if (ultraOptionSet.CheckedIndex != 0 && item.Key == "Expression")
				{
					ultraGridColumn.CellActivation = Activation.NoEdit;
				}
				ultraGridBand.Columns.Add(ultraGridColumn);
			}
			ultraGridBand.Columns["Minimum"].Header.Caption = mResourceManager.GetString("MinimumString");
			ultraGridBand.Columns["Comparision"].Header.Caption = mResourceManager.GetString("ComparisionString");
			ultraGridBand.Columns["Expression"].Header.Caption = mResourceManager.GetString("ExpressionString");
			ultraGridBand.Columns["Comparision "].Header.Caption = mResourceManager.GetString("ComparisionString");
			ultraGridBand.Columns["Maximum"].Header.Caption = mResourceManager.GetString("MaximumString");
			ultraGridBand.Columns["Minimum"].MaskInput = "nnnnnnnnnnnnnnnn.nn";
			ultraGridBand.Columns["Minimum"].Width = 120;
			ultraGridBand.Columns["Maximum"].MaskInput = "nnnnnnnnnnnnnnnn.nn";
			ultraGridBand.Columns["Maximum"].Width = 120;
			ultraGridCondition.DisplayLayout.BandsSerializer.Add(ultraGridBand);
			ultraGridCondition.DataSource = ultraDataSource;
			ultraGridCondition.UpdateMode = UpdateMode.OnUpdate;
			((ISupportInitialize)ultraGridCondition).EndInit();
		}

		private void ultraOptionSet_MouseDoubleClick(object sender, MouseEventArgs e)
		{
			try
			{
				if (ultraOptionSet.CheckedIndex == 0)
				{
					Expression_Editor expression_Editor = new Expression_Editor(mApplication, m_LRuleItem, ultraGridCondition.ActiveRow.Cells[2].Text, m_LProjectName, m_LPattern, m_LTarget, m_LExpressionCheck, m_LOperator, m_LValue);
					expression_Editor.ShowDialog();
					if (expression_Editor.DialogResult == DialogResult.OK)
					{
						ultraGridCondition.ActiveRow.Cells[2].Value = expression_Editor.GetSelectExpressionText;
						m_LPattern = expression_Editor.GetPatternIndex;
						m_LTarget = expression_Editor.GetTargetIndex;
						m_LExpressionCheck = expression_Editor.GetExpressionCheck;
						m_LOperator = expression_Editor.GetOperatorIndex;
						m_LValue = expression_Editor.GetValueIndex;
						if (m_LExpressionIndex > 8)
						{
							m_LExpressionIndex -= 10;
						}
					}
					if (m_LRuleItem.ExpressionEditorList != null)
					{
						ValueList valueList = new ValueList();
						for (int i = 0; i < m_LRuleItem.ExpressionEditorList.Count; i++)
						{
							valueList.ValueListItems.Add(i + 1, m_LRuleItem.ExpressionEditorList[i].Expression_Name);
						}
						valueList.ValueListItems.Add(m_LRuleItem.ExpressionEditorList.Count + 1, " ");
						{
							foreach (UltraGridRow row in ultraGridCondition.Rows)
							{
								row.Cells["Expression"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
								row.Cells["Expression"].ValueList = valueList;
							}
							return;
						}
					}
					ultraGridCondition.DisplayLayout.Bands[0].Columns[2].CellActivation = Activation.NoEdit;
					return;
				}
				string mExpression = "";
				if (m_LRuleItem.ExpressionEditorList != null)
				{
					foreach (IExressionEditor expressionEditor in m_LRuleItem.ExpressionEditorList)
					{
						if (expressionEditor.Expression_Name == ultraGridCondition.ActiveRow.Cells[2].Text)
						{
							mExpression = expressionEditor.Expression_Content;
							break;
						}
					}
				}
				EFormula eFormula = new EFormula(mApplication, mExpression, m_LProjectName, m_LPattern, m_LTarget, m_LOperator, m_LValue);
				eFormula.ShowDialog();
				if (eFormula.DialogResult == DialogResult.OK)
				{
					ultraGridCondition.ActiveRow.Cells[2].Value = eFormula.GetExpressionText;
					m_LPattern = eFormula.GetPatternIndex;
					m_LTarget = eFormula.GetTargetIndex;
					m_LOperator = eFormula.GetOperatorIndex;
					m_LValue = eFormula.GetValueIndex;
					if (m_LExpressionIndex < 0)
					{
						m_LExpressionIndex = 10;
					}
					else
					{
						m_LExpressionIndex += 10;
					}
				}
			}
			catch (Exception ex)
			{
				mPcrLogService.ShowExceptionDialogBox(ex);
			}
		}

		private void ultraGridCondition_DoubleClickCell(object sender, DoubleClickCellEventArgs e)
		{
			try
			{
				if (!(e.Cell.Column.Key == "Expression"))
				{
					return;
				}
				if (ultraOptionSet.CheckedIndex != 0)
				{
					string mExpression = "";
					if (m_LExpressionIndex > 8)
					{
						mExpression = e.Cell.Text;
					}
					else if (m_LRuleItem.ExpressionEditorList != null)
					{
						foreach (IExressionEditor expressionEditor in m_LRuleItem.ExpressionEditorList)
						{
							if (expressionEditor.Expression_Name == ultraGridCondition.ActiveRow.Cells[2].Text)
							{
								mExpression = expressionEditor.Expression_Content;
								break;
							}
						}
					}
					EFormula eFormula = new EFormula(mApplication, mExpression, m_LProjectName, m_LPattern, m_LTarget, m_LOperator, m_LValue);
					eFormula.ShowDialog();
					if (eFormula.DialogResult == DialogResult.OK)
					{
						ultraGridCondition.ActiveRow.Cells[2].Value = eFormula.GetExpressionText;
						m_LPattern = eFormula.GetPatternIndex;
						m_LTarget = eFormula.GetTargetIndex;
						m_LOperator = eFormula.GetOperatorIndex;
						m_LValue = eFormula.GetValueIndex;
						m_LExpressionIndex += 10;
					}
				}
				foreach (UltraGridColumn column in ultraGridCondition.DisplayLayout.Bands[0].Columns)
				{
					column.PerformAutoResize(PerformAutoSizeType.AllRowsInBand);
					column.Width += 24;
				}
			}
			catch (Exception ex)
			{
				mPcrLogService.ShowExceptionDialogBox(ex);
			}
		}

		private void ultraGridCondition_CellChange(object sender, CellEventArgs e)
		{
			try
			{
				if (e.Cell.Column.Key == "Comparision" && e.Cell.Text == " ")
				{
					ultraGridCondition.ActiveRow.Cells[0].Value = DBNull.Value;
					ultraGridCondition.ActiveRow.Cells[1].Selected = true;
				}
				if (e.Cell.Column.Key == "Comparision " && e.Cell.Text == " ")
				{
					ultraGridCondition.ActiveRow.Cells[4].Value = DBNull.Value;
					ultraGridCondition.ActiveRow.Cells[3].Selected = true;
				}
			}
			catch (Exception ex)
			{
				mPcrLogService.ShowExceptionDialogBox(ex);
			}
		}

		private void ultraGridCondition_InitializeLayout(object sender, InitializeLayoutEventArgs e)
		{
			try
			{
				e.Layout.Override.CellClickAction = CellClickAction.EditAndSelectText;
				e.Layout.Override.CellAppearance.BackColor = Color.White;
				e.Layout.Override.AllowMultiCellOperations = AllowMultiCellOperation.None;
				e.Layout.Override.RowSizing = RowSizing.AutoFixed;
				e.Layout.ViewStyleBand = ViewStyleBand.Horizontal;
				e.Layout.Override.RowSelectors = DefaultableBoolean.False;
				e.Layout.Override.ExpansionIndicator = ShowExpansionIndicator.Never;
				e.Layout.CaptionVisible = DefaultableBoolean.False;
				e.Layout.Override.ColumnAutoSizeMode = ColumnAutoSizeMode.AllRowsInBand;
				e.Layout.Override.AllowColMoving = AllowColMoving.NotAllowed;
				e.Layout.Override.AllowColSizing = AllowColSizing.None;
				e.Layout.Scrollbars = Scrollbars.Horizontal;
				e.Layout.Override.RowSizing = RowSizing.AutoFixed;
				e.Layout.Override.ColumnAutoSizeMode = ColumnAutoSizeMode.AllRowsInBand;
				e.Layout.Override.FilterClearButtonLocation = FilterClearButtonLocation.Row;
				ValueList valueList = new ValueList();
				valueList.ValueListItems.Add(1, "<");
				valueList.ValueListItems.Add(2, "<=");
				valueList.ValueListItems.Add(3, " ");
				e.Layout.Bands[0].Columns[1].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
				e.Layout.Bands[0].Columns[1].ValueList = valueList;
				if (ultraOptionSet.CheckedIndex == 0)
				{
					if (m_LRuleItem != null)
					{
						if (m_LRuleItem.ExpressionEditorList != null)
						{
							ValueList valueList2 = new ValueList();
							for (int i = 0; i < m_LRuleItem.ExpressionEditorList.Count; i++)
							{
								valueList2.ValueListItems.Add(i + 1, m_LRuleItem.ExpressionEditorList[i].Expression_Name);
							}
							valueList2.ValueListItems.Add(m_LRuleItem.ExpressionEditorList.Count + 1, " ");
							e.Layout.Bands[0].Columns[2].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
							e.Layout.Bands[0].Columns[2].ValueList = valueList2;
						}
						else
						{
							e.Layout.Bands[0].Columns[2].CellActivation = Activation.NoEdit;
						}
					}
					else
					{
						e.Layout.Bands[0].Columns[2].CellActivation = Activation.NoEdit;
					}
				}
				ValueList valueList3 = new ValueList();
				valueList3.ValueListItems.Add(1, "<");
				valueList3.ValueListItems.Add(2, "<=");
				valueList3.ValueListItems.Add(3, "=");
				valueList3.ValueListItems.Add(4, "<>");
				valueList3.ValueListItems.Add(5, " ");
				e.Layout.Bands[0].Columns[3].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
				e.Layout.Bands[0].Columns[3].ValueList = valueList3;
				e.Layout.Bands[0].Columns[0].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Double;
				e.Layout.Bands[0].Columns[0].PromptChar = ' ';
				e.Layout.Bands[0].Columns[4].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Double;
				e.Layout.Bands[0].Columns[4].PromptChar = ' ';
				e.Layout.Override.FilterOperandStyle = FilterOperandStyle.DropDownList;
				e.Layout.Override.FilterOperatorDropDownItems = FilterOperatorDropDownItems.Equals;
				e.Layout.Override.FilterOperatorDefaultValue = FilterOperatorDefaultValue.Equals;
				e.Layout.Override.FilterOperatorLocation = FilterOperatorLocation.Hidden;
				e.Layout.Override.RowFilterMode = RowFilterMode.SiblingRowsOnly;
				e.Layout.Override.SequenceFilterRow = 0;
				e.Layout.Override.SelectTypeCell = SelectType.Extended;
				e.Layout.Override.SelectTypeCol = SelectType.Extended;
				e.Layout.Override.SelectTypeRow = SelectType.Extended;
				e.Layout.UseFixedHeaders = true;
				e.Layout.Override.FixedHeaderIndicator = FixedHeaderIndicator.None;
				foreach (UltraGridColumn column in e.Layout.Bands[0].Columns)
				{
					column.PerformAutoResize(PerformAutoSizeType.AllRowsInBand);
					column.Width += 24;
				}
				e.Layout.Bands[0].Columns["Minimum"].Width = 120;
				e.Layout.Bands[0].Columns["Maximum"].Width = 120;
			}
			catch (Exception ex)
			{
				mPcrLogService.ShowExceptionDialogBox(ex);
			}
		}

		private void btOk_Click(object sender, EventArgs e)
		{
			try
			{
				if (ultraGridCondition.ActiveRow.Cells[0].Value == null && ultraGridCondition.ActiveRow.Cells[4].Value == null)
				{
					MessageBox.Show(mResourceManager.GetString("MinMaxValueNotEmptyString"), mResourceManager.GetString("ErrorString"));
					return;
				}
				if (ultraGridCondition.ActiveRow.Cells[1].Text == " " && ultraGridCondition.ActiveRow.Cells[3].Text == " ")
				{
					MessageBox.Show(mResourceManager.GetString("ComparisionNotEmptyString"), mResourceManager.GetString("ErrorString"));
					return;
				}
				if (ultraGridCondition.ActiveRow.Cells[1].Text != " " && ultraGridCondition.ActiveRow.Cells[0].Value.ToString() == "")
				{
					MessageBox.Show(mResourceManager.GetString("MinValueNotEmptyString"), mResourceManager.GetString("ErrorString"));
					return;
				}
				if (ultraGridCondition.ActiveRow.Cells[3].Text != " " && ultraGridCondition.ActiveRow.Cells[4].Value.ToString() == "")
				{
					MessageBox.Show(mResourceManager.GetString("MaxValueNotEmptyString"), mResourceManager.GetString("ErrorString"));
					return;
				}
				if (ultraGridCondition.ActiveRow.Cells[1].Text == " ")
				{
					m_LExpression = ultraGridCondition.ActiveRow.Cells[2].Text + " " + ultraGridCondition.ActiveRow.Cells[3].Text + " " + ultraGridCondition.ActiveRow.Cells[4].Value.ToString();
					if (m_LExpressionIndex > 8)
					{
						m_LExpressionIndex = 10;
					}
					else
					{
						m_LExpressionIndex = 0;
					}
				}
				else if (ultraGridCondition.ActiveRow.Cells[3].Text == " ")
				{
					m_LExpression = ultraGridCondition.ActiveRow.Cells[0].Value.ToString() + " " + ultraGridCondition.ActiveRow.Cells[1].Text + " " + ultraGridCondition.ActiveRow.Cells[2].Text;
					if (m_LExpressionIndex > 8)
					{
						m_LExpressionIndex = 12;
					}
					else
					{
						m_LExpressionIndex = 2;
					}
				}
				else
				{
					if (double.Parse(ultraGridCondition.ActiveRow.Cells[0].Value.ToString()) > double.Parse(ultraGridCondition.ActiveRow.Cells[4].Value.ToString()))
					{
						MessageBox.Show(mResourceManager.GetString("ValueLargerThanAfterExpressionString"), mResourceManager.GetString("ErrorString"));
						return;
					}
					m_LExpression = ultraGridCondition.ActiveRow.Cells[0].Value.ToString() + " " + ultraGridCondition.ActiveRow.Cells[1].Text + " " + ultraGridCondition.ActiveRow.Cells[2].Text + " " + ultraGridCondition.ActiveRow.Cells[3].Text + " " + ultraGridCondition.ActiveRow.Cells[4].Value.ToString();
					if (m_LExpressionIndex > 8)
					{
						m_LExpressionIndex = 12;
					}
					else
					{
						m_LExpressionIndex = 2;
					}
				}
				base.DialogResult = DialogResult.OK;
				Close();
			}
			catch (Exception ex)
			{
				mPcrLogService.ShowExceptionDialogBox(ex);
			}
		}

		private void btCancel_Click(object sender, EventArgs e)
		{
			Close();
		}

		private void ultraOptionSet_ValueChanged(object sender, EventArgs e)
		{
			if (ultraOptionSet.CheckedIndex == 0)
			{
				foreach (UltraGridRow row in ultraGridCondition.Rows)
				{
					row.Cells["Expression"].Value = "";
				}
				{
					foreach (UltraGridColumn column in ultraGridCondition.DisplayLayout.Bands[0].Columns)
					{
						if (!(column.Key == "Expression"))
						{
							continue;
						}
						if (m_LRuleItem != null)
						{
							if (m_LRuleItem.ExpressionEditorList != null)
							{
								column.CellActivation = Activation.AllowEdit;
								ValueList valueList = new ValueList();
								for (int i = 0; i < m_LRuleItem.ExpressionEditorList.Count; i++)
								{
									valueList.ValueListItems.Add(i + 1, m_LRuleItem.ExpressionEditorList[i].Expression_Name);
								}
								valueList.ValueListItems.Add(m_LRuleItem.ExpressionEditorList.Count + 1, " ");
								column.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
								column.ValueList = valueList;
							}
							else
							{
								column.CellActivation = Activation.NoEdit;
							}
						}
						else
						{
							column.CellActivation = Activation.NoEdit;
						}
					}
					return;
				}
			}
			foreach (UltraGridColumn column2 in ultraGridCondition.DisplayLayout.Bands[0].Columns)
			{
				if (!(column2.Key == "Expression"))
				{
					continue;
				}
				column2.CellActivation = Activation.NoEdit;
				foreach (UltraGridRow row2 in ultraGridCondition.Rows)
				{
					row2.Cells["Expression"].Value = "";
				}
			}
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing && components != null)
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}

		private void InitializeComponent()
		{
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ExperimentRuleEditor.Condition_Editor));
			Infragistics.Win.Appearance appearance = new Infragistics.Win.Appearance();
			Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
			Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
			Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
			Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
			Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
			Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
			Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
			Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
			Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
			Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance();
			Infragistics.Win.ValueListItem valueListItem = new Infragistics.Win.ValueListItem();
			Infragistics.Win.ValueListItem valueListItem2 = new Infragistics.Win.ValueListItem();
			this.ultraGridCondition = new Infragistics.Win.UltraWinGrid.UltraGrid();
			this.ultraOptionSet = new Infragistics.Win.UltraWinEditors.UltraOptionSet();
			this.btOk = new System.Windows.Forms.Button();
			this.btCancel = new System.Windows.Forms.Button();
			((System.ComponentModel.ISupportInitialize)this.ultraGridCondition).BeginInit();
			((System.ComponentModel.ISupportInitialize)this.ultraOptionSet).BeginInit();
			base.SuspendLayout();
			this.ultraGridCondition.AccessibleDescription = null;
			this.ultraGridCondition.AccessibleName = null;
			resources.ApplyResources(this.ultraGridCondition, "ultraGridCondition");
			this.ultraGridCondition.BackgroundImage = null;
			appearance.BackColor = System.Drawing.SystemColors.Window;
			appearance.BorderColor = System.Drawing.Color.White;
			resources.ApplyResources(appearance, "appearance31");
			resources.ApplyResources(appearance.FontData, "appearance31.FontData");
			appearance.ForceApplyResources = "FontData|";
			this.ultraGridCondition.DisplayLayout.Appearance = appearance;
			this.ultraGridCondition.DisplayLayout.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
			this.ultraGridCondition.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.False;
			appearance2.BackColor = System.Drawing.SystemColors.ActiveBorder;
			appearance2.BackColor2 = System.Drawing.SystemColors.ControlDark;
			appearance2.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
			appearance2.BorderColor = System.Drawing.SystemColors.Window;
			resources.ApplyResources(appearance2, "appearance32");
			resources.ApplyResources(appearance2.FontData, "appearance32.FontData");
			appearance2.ForceApplyResources = "FontData|";
			this.ultraGridCondition.DisplayLayout.GroupByBox.Appearance = appearance2;
			appearance3.ForeColor = System.Drawing.SystemColors.GrayText;
			resources.ApplyResources(appearance3, "appearance33");
			resources.ApplyResources(appearance3.FontData, "appearance33.FontData");
			appearance3.ForceApplyResources = "FontData|";
			this.ultraGridCondition.DisplayLayout.GroupByBox.BandLabelAppearance = appearance3;
			this.ultraGridCondition.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
			appearance4.BackColor = System.Drawing.SystemColors.ControlLightLight;
			appearance4.BackColor2 = System.Drawing.SystemColors.Control;
			appearance4.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
			appearance4.ForeColor = System.Drawing.SystemColors.GrayText;
			resources.ApplyResources(appearance4, "appearance34");
			resources.ApplyResources(appearance4.FontData, "appearance34.FontData");
			appearance4.ForceApplyResources = "FontData|";
			this.ultraGridCondition.DisplayLayout.GroupByBox.PromptAppearance = appearance4;
			this.ultraGridCondition.DisplayLayout.MaxColScrollRegions = 1;
			this.ultraGridCondition.DisplayLayout.MaxRowScrollRegions = 1;
			appearance5.BackColor = System.Drawing.SystemColors.Window;
			appearance5.ForeColor = System.Drawing.SystemColors.ControlText;
			resources.ApplyResources(appearance5, "appearance35");
			resources.ApplyResources(appearance5.FontData, "appearance35.FontData");
			appearance5.ForceApplyResources = "FontData|";
			this.ultraGridCondition.DisplayLayout.Override.ActiveCellAppearance = appearance5;
			this.ultraGridCondition.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.Dotted;
			this.ultraGridCondition.DisplayLayout.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.Dotted;
			appearance6.BorderColor = System.Drawing.Color.Silver;
			resources.ApplyResources(appearance6, "appearance36");
			appearance6.TextTrimming = Infragistics.Win.TextTrimming.EllipsisCharacter;
			resources.ApplyResources(appearance6.FontData, "appearance36.FontData");
			appearance6.ForceApplyResources = "FontData|";
			this.ultraGridCondition.DisplayLayout.Override.CellAppearance = appearance6;
			this.ultraGridCondition.DisplayLayout.Override.CellPadding = 0;
			appearance7.BackColor = System.Drawing.SystemColors.Control;
			appearance7.BackColor2 = System.Drawing.SystemColors.ControlDark;
			appearance7.BackGradientAlignment = Infragistics.Win.GradientAlignment.Element;
			appearance7.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
			appearance7.BorderColor = System.Drawing.SystemColors.Window;
			resources.ApplyResources(appearance7, "appearance37");
			resources.ApplyResources(appearance7.FontData, "appearance37.FontData");
			appearance7.ForceApplyResources = "FontData|";
			this.ultraGridCondition.DisplayLayout.Override.GroupByColumnAppearance = appearance7;
			resources.ApplyResources(appearance8, "appearance38");
			resources.ApplyResources(appearance8.FontData, "appearance38.FontData");
			appearance8.ForceApplyResources = "FontData|";
			this.ultraGridCondition.DisplayLayout.Override.HeaderAppearance = appearance8;
			this.ultraGridCondition.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.WindowsXPCommand;
			appearance9.BackColor = System.Drawing.SystemColors.Window;
			appearance9.BorderColor = System.Drawing.Color.Silver;
			resources.ApplyResources(appearance9, "appearance39");
			resources.ApplyResources(appearance9.FontData, "appearance39.FontData");
			appearance9.ForceApplyResources = "FontData|";
			this.ultraGridCondition.DisplayLayout.Override.RowAppearance = appearance9;
			appearance10.ImageAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
			resources.ApplyResources(appearance10, "appearance41");
			resources.ApplyResources(appearance10.FontData, "appearance41.FontData");
			appearance10.ForceApplyResources = "FontData|";
			this.ultraGridCondition.DisplayLayout.Override.RowSelectorAppearance = appearance10;
			this.ultraGridCondition.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True;
			appearance11.BackColor = System.Drawing.SystemColors.ControlLight;
			resources.ApplyResources(appearance11, "appearance40");
			resources.ApplyResources(appearance11.FontData, "appearance40.FontData");
			appearance11.ForceApplyResources = "FontData|";
			this.ultraGridCondition.DisplayLayout.Override.TemplateAddRowAppearance = appearance11;
			this.ultraGridCondition.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
			this.ultraGridCondition.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy;
			this.ultraGridCondition.Name = "ultraGridCondition";
			this.ultraGridCondition.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(ultraGridCondition_InitializeLayout);
			this.ultraGridCondition.CellChange += new Infragistics.Win.UltraWinGrid.CellEventHandler(ultraGridCondition_CellChange);
			this.ultraGridCondition.DoubleClickCell += new Infragistics.Win.UltraWinGrid.DoubleClickCellEventHandler(ultraGridCondition_DoubleClickCell);
			this.ultraOptionSet.AccessibleDescription = null;
			this.ultraOptionSet.AccessibleName = null;
			resources.ApplyResources(this.ultraOptionSet, "ultraOptionSet");
			this.ultraOptionSet.BackgroundImage = null;
			this.ultraOptionSet.BorderStyle = Infragistics.Win.UIElementBorderStyle.None;
			this.ultraOptionSet.CheckedIndex = 0;
			this.ultraOptionSet.Font = null;
			valueListItem.CheckState = System.Windows.Forms.CheckState.Checked;
			valueListItem.DataValue = "Default Item";
			resources.ApplyResources(valueListItem, "valueListItem1");
			valueListItem.ForceApplyResources = "";
			valueListItem2.DataValue = "ValueListItem1";
			resources.ApplyResources(valueListItem2, "valueListItem2");
			valueListItem2.ForceApplyResources = "";
			this.ultraOptionSet.Items.AddRange(new Infragistics.Win.ValueListItem[2] { valueListItem, valueListItem2 });
			this.ultraOptionSet.ItemSpacingVertical = 20;
			this.ultraOptionSet.Name = "ultraOptionSet";
			this.ultraOptionSet.ValueChanged += new System.EventHandler(ultraOptionSet_ValueChanged);
			this.ultraOptionSet.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(ultraOptionSet_MouseDoubleClick);
			this.btOk.AccessibleDescription = null;
			this.btOk.AccessibleName = null;
			resources.ApplyResources(this.btOk, "btOk");
			this.btOk.BackgroundImage = null;
			this.btOk.Font = null;
			this.btOk.Name = "btOk";
			this.btOk.UseVisualStyleBackColor = true;
			this.btOk.Click += new System.EventHandler(btOk_Click);
			this.btCancel.AccessibleDescription = null;
			this.btCancel.AccessibleName = null;
			resources.ApplyResources(this.btCancel, "btCancel");
			this.btCancel.BackgroundImage = null;
			this.btCancel.Font = null;
			this.btCancel.Name = "btCancel";
			this.btCancel.UseVisualStyleBackColor = true;
			this.btCancel.Click += new System.EventHandler(btCancel_Click);
			base.AccessibleDescription = null;
			base.AccessibleName = null;
			resources.ApplyResources(this, "$this");
			base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.BackgroundImage = null;
			base.Controls.Add(this.btCancel);
			base.Controls.Add(this.btOk);
			base.Controls.Add(this.ultraOptionSet);
			base.Controls.Add(this.ultraGridCondition);
			this.Font = null;
			base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			base.Icon = null;
			base.MaximizeBox = false;
			base.MinimizeBox = false;
			base.Name = "Condition_Editor";
			base.ShowIcon = false;
			base.ShowInTaskbar = false;
			((System.ComponentModel.ISupportInitialize)this.ultraGridCondition).EndInit();
			((System.ComponentModel.ISupportInitialize)this.ultraOptionSet).EndInit();
			base.ResumeLayout(false);
		}
	}
}
